package org.web.accesscontrollist.server.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.web.accesscontrollist.sdk.biz.AclResourceDetailBiz;
import org.web.accesscontrollist.sdk.dto.AclResourceDetailDTO;
import org.web.accesscontrollist.sdk.dto.query.QueryAclResourceDetailRequest;
import org.web.base.domain.ResultDO;

import jakarta.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/detail")
public class DetailController {

    @Resource
    private AclResourceDetailBiz aclResourceDetailBiz;

    @ResponseBody
    @RequestMapping("selectDetailList")
    public ResultDO selectDetailList(QueryAclResourceDetailRequest queryAclResourceDetailRequest) {
        Long current = System.currentTimeMillis();
        ResultDO<List<AclResourceDetailDTO>> resultDO = aclResourceDetailBiz.selectAclResourceDetailList(queryAclResourceDetailRequest);
        System.out.println("avg is " + (System.currentTimeMillis() - current));
        return resultDO;
    }

}
